MenuItem.Popup Method

Displays the MenuItem as a contextual menu. If no parameters are passed, the contextual menu appears at the location of the mouse pointer.

Syntax

MenuItem.Popup [x], [y]


Parameters

x (Optional)

Integer

y (Optional)

Integer


If you pass the optional parameters, the contextual menu appears at the passed location. The coordinates are global, not just in the object that handles the MouseDown event.

Popup returns the selected item as a MenuItem. The selected item's Action event will be fired. If the selected item is handled by a MenuHandler that returns True, then PopUp will return Nil.